
var initData = function(){
	var url = base+"/projectCenter/sjps/mentionDetailData";
    var param = {mention_data_id:mention_id,project_id:project_id};
	$.ajax({
        url: url,
        data: param,
        success: function (data, textStatus, jqXHR) {
        	var html = data.form;
        	$("#view").html("");
        	$("#view").html(html);
        	upload();
        },
        error: function () {
        }
    });
}

$("body").delegate("[preview_path]","click",function(){
	var preview_path = $(this).attr("preview_path");
	if(preview_path == "" || preview_path == undefined || preview_path == null){
		layer.msg('文件不存在,无法预览!', {icon: 2,time:2000});
		return false;
	}else{
		var url = base+"/projectCenter/sjps/previewDataFile/"+preview_path;
		POBrowser.openWindowModeless(url,'width=1050px;height=900px;');
		return false;
	}
});

$("body").delegate("[download_path]","click",function(){
	var download_path = $(this).attr("download_path");
	if(download_path == "" || download_path == undefined || download_path == null){
		layer.msg('文件不存在,无法下载!', {icon: 2,time:2000});
		return false;
	}else{
		var show_file_url = base+"/datacenter/common/getFileById?file_id="+download_path;
		window.open(show_file_url,"_self");
		return false;
	}
});
function backup(){
    var url = base+"/projectCenter/sjps/index/"+project_id;
    $.get(url, function(result){
        // $(".layui-show").html("");
        $("#mention_data").html(result)

    });
}
$(document).ready(function(){
	initData();
});